package com.bigdata.demo.dao;

import com.bigdata.demo.entity.User;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
@Mapper
public interface UserDao {
    @Select("SELECT * FROM user WHERE user_num=#{userId}")
    User getUserById(@Param("userId") Integer userId);

    @Select("SELECT * FROM user WHERE username=#{userName}")
    User getUserByName(@Param("userName") String userName);
    int addUser( User User);

    @Select("SELECT * FROM user")
    List<User> getAllUser();
}
